import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers"
import Components from "unplugin-vue-components/vite"
// https://vitejs.dev/config/
export default defineConfig({
  // devServer:{
  //   proxy:{
  //     '/api':{
  //       target:"http://47.120.14.63:8081",
  //       // pathRewrite:{'^/api':''}
  //     }
  //   }
  // },
  plugins: [
    vue(),
    Components({
      // 以后放在src/components自动引入到组件中，无需import
      dirs: ["src/components"],
      resolvers: [AntDesignVueResolver({ importStyle: true, resolveIcons: true })]
    })
  ],
})

